# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kgeotag
pkgver=1.2.0
pkgrel=0
# armhf blocked by extra-cmake-modules
# ppc64le blocked by qt5-qtwebengine -> marble
# s390x, riscv64 blocked by polkit -> kxmlgui
arch="all !armhf !ppc64le !s390x !riscv64"
url="https://apps.kde.org/kgeotag/"
pkgdesc="Photo geotagging program"
license="GPL-3.0-or-later"
makedepends="
	extra-cmake-modules
	kconfigwidgets-dev
	kcoreaddons-dev
	kcrash-dev
	ki18n-dev
	kxmlgui-dev
	libkexiv2-dev
	marble-dev
	qt5-qtbase-dev
	"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/kgeotag/$pkgver/kgeotag-$pkgver.tar.xz"
subpackages="$pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
818a89babe613602b9843109c10632b09dfe0bba5e28d5332eb17c1c3841a30049dbe298a4b3c8123d72751dfa29eb5994d9d4e683a85f9b121161005c4fee65  kgeotag-1.2.0.tar.xz
"
